<?php
	session_start();
	include 'db.php';
	include 'inc/header.php';
	if(isset($_POST['rQuotes'])){
		
		if(@$_POST['qname'] && @$_POST['qemail'] && @$_POST['qcompany'] && @$_POST['qcontact']){
			$_SESSION['req_name'] = $_POST['qname'];
			$_SESSION['req_email'] = $_POST['qemail'];
			$_SESSION['req_company'] = $_POST['qcompany']; 
			$_SESSION['req_contact'] = $_POST['qcontact'];
			$_SESSION['req_qses'] = 1; 
			header('location:cart-canvas.php');
		}
	}

?>

<!DOCTYPE HTML>
<html>
    <head>
    <meta charset=utf-8>
    <title>LEDLAMPS</title>
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script src="js/modernizr-1.7.min.js"></script><!-- this is the javascript allowing html5 to run in older browsers -->
    
    <link rel="stylesheet" type="text/css" href="css/reset.css" media="screen" title="html5doctor.com Reset Stylesheet" />
    
    <link rel="stylesheet" href="css/default.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="screen" />
    
    <!-- in the CSS3 stylesheet you will find examples of some great new features CSS has to offer -->
    <link rel="stylesheet" type="text/css" href="css/css3.css" media="screen" />
    
    <!-- general stylesheet contains some default styles, you do not need this, but it helps you keep a uniform style -->
    <link rel="stylesheet" type="text/css" href="css/general.css" media="screen" />
    
    <!-- grid's will help you keep your website appealing to your users, view 52framework.com website for documentation -->
    <link rel="stylesheet" type="text/css" href="css/grid.css" media="screen" />
    </head>
<body>
	 <?php get_header('login','public'); ?>

	 
	<section class="row">
    <?php 
		if(isset($_GET['action'])){
			$action = $_GET['action'];
			if($action == 'logerror'){
			echo '<div class="alert loginerror col_4 box-align-center"><button type="button" class="close" data-dismiss="alert">×</button><strong>Login Failed! </strong>Your Username and Password does not match.</div>';
			}else if($action == 'outsuccess'){
			echo '<div class="alert alert-success loginerror col_4 box-align-center"><button type="button" class="close" data-dismiss="alert">×</button><strong>Log out successful! </strong>Have a great day.</div>';	
			}
		}
	?>
    <div align="center">
    <div style="width:600px;">
     <div class="rounded loginbox col_4 box_shadow box-align-center" style="float:left;" align="left">
     	<form id="login-form" method="post" action="sales-login-validate.php">
          <fieldset>
            <legend style="margin-bottom:17px;">Sales Log In</legend>
            <div style="border:1px solid #EBEBEB; margin-bottom:5px; padding:5px; font-size:11px; color:#999;">
            	This form is intended only for the sales agent of ledlamps UAE. if you are an sales agent you can directly send us yoour quote using the new customer form.
            </div>
            <div class="loginElem">
                <label>Username</label>
                <input name="myuser" id="myuser" type="text" placeholder="Type your username here"></div>
             <div class="loginElem">
             <label>Password</label>
            <input name="mypass" id="mypass" type="password" placeholder="Type your password here"></div>
            <button type="submit" class="btn btn-primary">Submit</button>
          </fieldset>
        </form>
     </div>
     
     <div class="rounded loginbox col_4 box_shadow box-align-center" style="float:left; margin-left:30px;" align="left">
     	<form id="login-form" method="post" style="margin:0px;">
        <fieldset>
        <legend>New Customer</legend>
          <table width="100" border="0">
          	<tr>
            	<td>Name<br/>
                	<input type="text" name="qname" value="" placeholder="Required" />	
                </td>
            </tr>
            <tr>
                <td>Email Address<br/>
                	<input type="text" name="qemail" value="" placeholder="Required" />	
                </td>
           </tr>
           <tr>
                <td>Company<br/>
                	<input type="text" name="qcompany" value="" placeholder="Required" />	
                </td>
            </tr>
            <tr>
                <td>Contact Number<br/>
                	<input type="text" name="qcontact" value="" placeholder="Required" />	
                </td>
            </tr>
            <tr>
                <td align="right">
                	<button type="submit" name="rQuotes" class="btn btn-primary">Request Quote</button>
                </td>
            </tr>
            
          </table>
          </fieldset>
        </form>
     </div>
     <div class="clear"></div>
     </div>
     </div>
    	
    </section>
    <footer class="row">

		<div class="col_16 col">all rights reserved &copy; <a href="#">LEDLAMPS</a> | </div>

	</footer>
	 
    <script src="js/bootstrap.min.js"></script>
</body>
</html>